<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="//cdn.bootcss.com/rxjs/5.2.0/Rx.js"></script>
<script>
  var rx = new Rx.Subject;
  // 订阅
  rx.subscribe(function (d) {
    console.log(d);  // => {name: "wei", age: 24}
  });
  // 发布
  rx.next({
    name: "wei",
    age: 24
  });
</script>
</body>
</html>
